package com.example.myblog.pojo;

import java.util.Date;

/**
 * @BelongsProject: MyBlog
 * @BelongsPackage: com.example.myblog.pojo
 * @ClassName Article
 * @CreateTime: 2025-05-31  20:29
 * @Author: TangLiFei
 */
public class Article {
    private Integer id;          // 文章id
    private String title;       // 文章标题
    private String content;     // 文章内容
    private Date createTime;       // 文章创建时间
    private Date modifieTime;      // 文章修改时间
    private Boolean allowComment; // 是否允许评论，默认为true
    private String photo;     // 文章缩略图
    private String author;
    private Integer hits;       // 点击量
    private Integer commentsNum;  // 评论总量
    private Integer commentCount;//每篇文章的评论数

    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifieTime() {
        return modifieTime;
    }

    public void setModifieTime(Date modifieTime) {
        this.modifieTime = modifieTime;
    }

    public Boolean getAllowComment() {
        return allowComment;
    }

    public void setAllowComment(Boolean allowComment) {
        this.allowComment = allowComment;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public Integer getHits() {
        return hits;
    }

    public void setHits(Integer hits) {
        this.hits = hits;
    }

    public Integer getCommentsNum() {
        return commentsNum;
    }

    public void setCommentsNum(Integer commentsNum) {
        this.commentsNum = commentsNum;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", createTime=" + createTime +
                ", modifieTime=" + modifieTime +
                ", allowComment=" + allowComment +
                ", photo='" + photo + '\'' +
                ", author='" + author + '\'' +
                ", hits=" + hits +
                ", commentsNum=" + commentsNum +
                '}';
    }
}
